﻿using Autofac.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace IOC.Framework.AutoFacExt
{
    public class CustomProjectAttribute : IPropertySelector
    {
        public bool InjectProperty(PropertyInfo propertyInfo, object instance)
        {
            // 在这里判断那些属性需要注入
            return propertyInfo.CustomAttributes.Any(c => c.AttributeType == typeof(CustomSelectAttribute));
           
        }
    }
}
